﻿<%@ Page AutoEventWireup="true" CodeBehind="Admin_Book.aspx.cs" Inherits="V5_EShop.Admin.Book.Admin_Book"
    Language="C#" MasterPageFile="~/Includes/AdminMaster.Master" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="title">
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="head">
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="content">
    <table width="100%" border="0" cellpadding="2" cellspacing="1" class="tablelist">
        <tr>
            <td class="headertext">
                位置导航：<a class="list_link" href="<%=this.ResolveUrl("~/") %>Admin/Admin_Index_Main.aspx"
                    target="main">首页</a> >> 图书管理
            </td>
        </tr>
        <tr>
            <td>
                <a href="?">管理首页</a> | <a href="?Action=edit">添加图书</a>
            </td>
        </tr>
    </table>
    <asp:MultiView ID="MultiViewList" runat="server" ActiveViewIndex="0">
        <asp:View ID="View1" runat="server">
            <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" GridLines="None"
                OnRowCommand="gvList_RowCommand" CssClass="tablelist">
                <HeaderStyle CssClass="headertext" />
                <Columns>
                    <asp:TemplateField HeaderText="选择" HeaderStyle-CssClass="headertext">
                        <HeaderTemplate>
                            <input id="Checkbox1" onclick="selectedAll(this);" type="checkbox" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="chkitem" runat="server" CssClass="checkitem" />
                            <asp:HiddenField ID="hfID" runat="server" Value='<%#Eval("ID") %>' />
                        </ItemTemplate>
                        <HeaderStyle CssClass="headertext" />
                        <ItemStyle Width="30px" HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="Id" HeaderText="Id" HeaderStyle-Width="30px"
                        ItemStyle-HorizontalAlign="Center"></asp:BoundField>
                    <asp:TemplateField HeaderText="图书名称">
                        <ItemTemplate>
                            [<span style="color: Blue"><%#Eval("ClassTitle").ToString() == "" ? "未归档" : Eval("ClassTitle")%></span>]<%#Eval("BookName")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Price" HeaderText="市场价格" HeaderStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
                    </asp:BoundField>
                    <asp:BoundField DataField="SellPrice" HeaderText="卖出价格" HeaderStyle-Width="80px"
                        ItemStyle-HorizontalAlign="Center"></asp:BoundField>
                    <asp:BoundField DataField="Author" HeaderText="作者"></asp:BoundField>
                    <asp:BoundField DataField="KcMax" HeaderText="库存上限" HeaderStyle-Width="60px" ItemStyle-HorizontalAlign="Center">
                    </asp:BoundField>
                    <asp:BoundField DataField="KcMin" HeaderText="库存下限" HeaderStyle-Width="60px" ItemStyle-HorizontalAlign="Center">
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" CommandArgument='<%#Bind("ID")%>' CommandName="go"
                                runat="server">修改</asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" CommandArgument='<%#Bind("ID")%>' CommandName="del"
                                runat="server" OnClientClick="return confirm('你确定要删除吗?');">删除</asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="200px" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <table border="0" align="center" cellpadding="0" cellspacing="0" class="tablelist">
                <tr>
                    <td>
                        <webdiyer:AspNetPager ID="Pager" runat="server" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条"
                            FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页" NextPageText="下一页"
                            OnPageChanged="Pager_PageChanged" PageIndexBoxType="DropDownList" PageSize="20"
                            PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
                            TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" AlwaysShow="True" Width="100%">
                        </webdiyer:AspNetPager>
                    </td>
                </tr>
            </table>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <table width="100%" border="0" cellpadding="2" cellspacing="1" class="tablelist">
                <tr class="headertext">
                    <td colspan="2">
                        <asp:Label ID="lblTitle" runat="server" Text="添加图书"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                        Isbn编号:
                    </td>
                    <td>
                        <asp:TextBox ID="txtIsbn" runat="server" Width="350px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        图书名称:
                    </td>
                    <td>
                        <asp:TextBox ID="txtBookName" runat="server" Width="550px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        图书分类:
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlClassId" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        出版社:
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlPubId" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        市场价格:
                    </td>
                    <td>
                        <asp:TextBox ID="txtPrice" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        卖出价格:
                    </td>
                    <td>
                        <asp:TextBox ID="txtSellPrice" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        出版日期:
                    </td>
                    <td>
                        <asp:TextBox ID="txtPubDate" runat="server" CssClass="Wdate" onFocus="showDateTime();"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        属性:
                    </td>
                    <td>
                        <asp:CheckBox ID="chkIfhot" runat="server" Text="是否畅销书" />
                    </td>
                </tr>
                <tr>
                    <td>
                        录入日期:
                    </td>
                    <td>
                        <asp:TextBox ID="txtRecDate" runat="server" CssClass="Wdate" onFocus="showDateTime();"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        进货折扣:
                    </td>
                    <td>
                        <asp:TextBox ID="txtJhzk" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        批销折扣:
                    </td>
                    <td>
                        <asp:TextBox ID="txtPxzk" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        零售折扣:
                    </td>
                    <td>
                        <asp:TextBox ID="txtLszk" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        作者:
                    </td>
                    <td>
                        <asp:TextBox ID="txtAuthor" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        字数:
                    </td>
                    <td>
                        <asp:TextBox ID="txtZiShu" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        装帧:
                    </td>
                    <td>
                        <asp:TextBox ID="txtZhzhen" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        开本:
                    </td>
                    <td>
                        <asp:TextBox ID="txtKaiBen" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        库存上限:
                    </td>
                    <td>
                        <asp:TextBox ID="txtKcMax" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        库存下限:
                    </td>
                    <td>
                        <asp:TextBox ID="txtKcMin" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        印次:
                    </td>
                    <td>
                        <asp:TextBox ID="txtYinCi" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Isbn类别:
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlIsbnKind" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        图片位置:
                    </td>
                    <td>
                        <asp:TextBox ID="txtWeiZhi" runat="server" Width="550px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        印张:
                    </td>
                    <td>
                        <asp:TextBox ID="txtYinZhang" runat="server" Width="50px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        描述:
                    </td>
                    <td>
                        <asp:TextBox ID="txtNote" runat="server"></asp:TextBox>
                        <script type="text/javascript">
        			        //<![CDATA[
                            CKEDITOR.replace('<%= this.txtNote.ClientID %>',
					        {
					            skin: 'v2',
					            height: 350,
					            resize_enabled: false
					        });
        			        //]]>
                        </script>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:HiddenField ID="hfID" runat="server" Value="0" />
                        <asp:Button ID="btnSave" runat="server" Text="添 加 保 存" OnClick="btnSave_Click" CssClass="ds-btn ds-btn-ok" />
                        <input id="Reset1" type="reset" value="重新设置" class="ds-btn" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>
